home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
comm
/
mmgr
/
MM_FbMRMv12.lha
/
MM
/
Other_Utils
/
MM_FbMRM-AutoCreateIndex.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1996-08-26
|
1KB
|
60 lines
/*
This program creates an index for MM_FbMRM
©1996 by Sebastian Bleikamp
*/
parse arg system.arguments
system.tempfile = 'T:FbMRM_CI.tmp'
address 'MAILMANAGER'
if (system.arguments='') then do
say "Help:"
say
say "rx MM_FbMRM-AutoCreateIndex.rexx <indexfile> <group> <type> <level> <path>"
say
exit 0
end
parse var system.arguments indexfile ' ' group ' ' type ' ' level ' ' path
address command 'LIST '||path||' LFORMAT "%N,;%P%N,;%L,;%C" FILES TO '||system.tempfile
MM_ReadStem system.tempfile 'RStem'
if (rc~=0) then exit 51
MM_DeleteStem system.tempfile
MM_SortStem 'RStem'
MM_ReadStem indexfile 'DSTEM'
if (rc~=0) then exit 52
bakfile = indexfile||'.bak'
MM_WriteStem bakfile 'DSTEM'
if (rc~=0) then exit 53
do i=0 to DStem.count-1
parse var DStem.i grp '|' othr
if (grp~=group) then do
MM_AddToStem 'IStem' 'DStem.'||i
end
end
do i=0 to RStem.count-1
parse var RStem.i fname ',;' fpath ',;' fsize ',;' fcom
add = group||'|'||fname||'|'||type||'|'||fpath||'|'||fsize||'|'||level||'|'||fcom
MM_AddToStem 'IStem' 'add'
end
MM_WriteStem indexfile 'IStem'
if (rc~=0) then exit 54
exit 0
/* EOF */